package com.ruoyi.asset.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.asset.mapper.DictionaryMapper;
import com.ruoyi.asset.domain.Dictionary;
import com.ruoyi.asset.service.IDictionaryService;

/**
 * 字典Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-12
 */
@Service
public class DictionaryServiceImpl implements IDictionaryService 
{
    @Autowired
    private DictionaryMapper dictionaryMapper;

    /**
     * 查询字典
     * 
     * @param id 字典主键
     * @return 字典
     */
    @Override
    public Dictionary selectDictionaryById(Long id)
    {
        return dictionaryMapper.selectDictionaryById(id);
    }

    /**
     * 查询字典列表
     * 
     * @param dictionary 字典
     * @return 字典
     */
    @Override
    public List<Dictionary> selectDictionaryList(Dictionary dictionary)
    {
        return dictionaryMapper.selectDictionaryList(dictionary);
    }

    /**
     * 新增字典
     * 
     * @param dictionary 字典
     * @return 结果
     */
    @Override
    public int insertDictionary(Dictionary dictionary)
    {
        return dictionaryMapper.insertDictionary(dictionary);
    }

    /**
     * 修改字典
     * 
     * @param dictionary 字典
     * @return 结果
     */
    @Override
    public int updateDictionary(Dictionary dictionary)
    {
        return dictionaryMapper.updateDictionary(dictionary);
    }

    /**
     * 批量删除字典
     * 
     * @param ids 需要删除的字典主键
     * @return 结果
     */
    @Override
    public int deleteDictionaryByIds(Long[] ids)
    {
        return dictionaryMapper.deleteDictionaryByIds(ids);
    }

    /**
     * 删除字典信息
     * 
     * @param id 字典主键
     * @return 结果
     */
    @Override
    public int deleteDictionaryById(Long id)
    {
        return dictionaryMapper.deleteDictionaryById(id);
    }
}
